package com.ewivt.excel.model;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class DistanceExcel{
    private String startName;
    private String startCode;
    private String endName;
    private String endCode;
    //起始经度
    private double startLongitude;
    //起始纬度
    private double startLatitude;
    private double endLongitude;
    private double endLatitude;
    private double distance;
    private int second;
    public Distance toDistance(){
        Distance distance = new Distance();
        distance.setStartName(this.startName);
        distance.setStartCode(this.startCode);
        distance.setEndName(this.endName);
        distance.setEndCode(this.endCode);
        distance.setStartLongitude(this.startLongitude);
        distance.setStartLatitude(this.startLatitude);
        distance.setEndLongitude(this.endLongitude);
        distance.setEndLatitude(this.endLatitude);
        distance.setDriveDistance(this.distance);
        return distance;
    }
}